<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="__CSS__/style_forum.css">
	<link rel="stylesheet" href="__CSS__/style_login.css">
	<link rel="stylesheet" href="__CSS__/reset.css">
	<title>用户登录 - ThinkPHP</title>
	<script type="text/javascript" src="__JS__/jquery-3.4.1.min.js"></script>
	<script type="text/javascript" src="__JS__/jquery.validate.min.js"></script>
	<script type="text/javascript" src="__JS__/loadinghtml.js"></script>
	<script type="text/javascript" src="__JS__/DropDown.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#login_form").validate({
				rules: {
					una:{
						required:true,
						maxlength:10,
					},
					upa:{
						required:true,
						minlength:6,
						maxlength:16
					},
					// captcha:{
					// 	required:true,
					// 	minlength:5
					// }
				},
				messages: {
					una:{
						required:"<span class='tips' id='uname'>请填写用户名</span>",
						maxlength:"<span class='tips' id='uname'>用户名最多包含10个字符</span>"
					},
					upa:{
						required:"<span class='tips' id='upasswd'>请填写密码</span>",
						minlength:"<span class='tips' id='upasswd'>密码至少包含6个字符</span>",
						maxlength:"<span class='tips' id='upasswd'>密码最多包含16个字符</span>"
					},
					// captcha:{
					// 	required:"<span class='tips' id='code_tips'>请填写验证码</span>",
					// 	minlength:"<span class='tips' id='code_tips'>请填写5位验证码</span>"
					// }
				}
			})
			$("#changeCaptcha").click(function(){
				$('#codeimg').attr('src',"/11guzp/public/index.php/captcha.html?"+Math.random());
			})
			$('#codeimg').click(function(){
				$(this).attr('src',"/11guzp/public/index.php/captcha.html?"+Math.random());
			})
		})
	</script>
</head>
<body>
	<div id="header" class="top">
		<div id="hd-main">
			<a id="alink" href="{:url('index/index')}" title="返回首页"></a>
			<ul id="main-nav">
				<li><a href="{:url('index/index')}">首页</a></li>
				<li id="triggerdown">
					<a href="{:url('index/view',['s_id'=>0])}">论坛</a>
					<ul id="dropdown">
						<li><a href="{:url('index/view',['s_id'=>0])}">全部</a></li>
						{volist name="sec" id="secRow"}
						<li><a href="{:url('index/view',['s_id'=>$secRow.s_id])}">{$secRow.s_name}</a></li>
						{/volist}
					</ul>
				</li>
				<li><a href="{:url('index/pa')}">修改密码</a></li>
				<li><a href="{:url('index/me')}">上传头像</a></li>
				<li style="background-color: #656565"><a href="{:url('user/login')}">登录</a></li>
				<li><a href="{:url('user/reg')}">注册</a></li>
				<li><a href="{:url('index/logout')}">退出</a></li>
				<li><a href="{:url('user/contact')}">联系我们</a></li>
			</ul>
			<div id="header-bar">
				<h3>欢迎你，请登录</h3>
				<div id="userloginmes">
					<a href="{:url('user/login')}" id="unlogin">
						<b></b>
					</a>
					<ul>
						<li><a href="{:url('user/login')}">登录</a></li>
						<li><a href="{:url('user/reg')}">注册</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div id="main">
		<form action="{:url('user/doLogin')}" method="post" id="login_form">
			<div id="login">
				<div class="login-hd">
					<strong>用户登录</strong><span>还没有帐号？点击<a href="{:url('user/reg')}">注册</a></span>
				</div>
				<table>
					<tr>
						<th>用户名</th>
						<td><input type="text" name="una"><span></span></td>
					</tr>
					<tr>
						<th>密&emsp;码</th>
						<td><input type="password" name="upa"><span></span></td>
					</tr>
					<tr>
						<th>验证码</th>
						<td>
							<input type="text" name="captcha" style="width: 100px;" id="code">
							<a id="changeCaptcha" href="javascript:void(0);">换一张？</a><span></span>
							<div style="margin-top: 10px;"><img src="{:captcha_src()}" id="codeimg" alt="captcha" /></div>
						</td>
					</tr>
					<tr>
						<th></th>
						<td><input type="submit" value="登录"><span><a href="{:url('user/rePa')}">找回密码</a></span></td>
					</tr>
				</table>
			</div>
			<div id="login-other">
				<div class="login-hd">
					<strong>使用其他帐号直接登录</strong>
				</div>
				<ul>
					<li><a href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=100277071&redirect_uri=http%3A%2F%2Fwww.thinkphp.cn%2Foauth%2Fcallback%2Ftype%2Fqq&response_type=code&scope=get_user_info%2Cadd_share">腾讯QQ登录</a></li>
					<li><a href="https://wx.qq.com/">腾讯微信登录</a></li>
					<li><a href="https://mail.163.com/">网易邮箱登录</a></li>
					<li><a href="https://api.weibo.com/oauth2/authorize?client_id=3891435835&redirect_uri=http%3A%2F%2Fwww.thinkphp.cn%2Foauth%2Fcallback%2Ftype%2Fsina&response_type=code###">新浪微博登录</a></li>
				</ul>
			</div>
		</form>
	</div>
	<div id="footer"></div>
</body>
</html>